<!--
 * @Author       : wfl
 * @LastEditors: ln
 * @description  :
 * @updateInfo   :
 * @Date         : 2022-11-02 18:15:19
 * @LastEditTime: 2023-08-14 14:42:42
-->
<script lang="ts" setup name="IkBtnImport">
import { props } from './useProps'

defineProps(props)
const emits = defineEmits<{
  (event: 'click', e: any): void
}>()
const { t } = useConfig()
const handleClick = (e: any) => {
  emits('click', e)
}
</script>

<template>
  <IkTooltip :content="t('action.import')">
    <!-- <el-button v-role="$props.role" v-bind="$attrs" :circle="circle">
      <template #icon>
        <i class="ik ik-daoru"></i>
      </template>
      <template v-if="!circle" #default>
        {{ t("action.import") }}
      </template>
    </el-button> -->
    <el-button
      v-if="btnType !== 'icon'"
      v-role="$props.role"
      v-bind="$attrs"
      :type="type"
      :style="{ minWidth: circle ? '40px' : '', minHeight: circle ? '40px' : '' }"
      :circle="circle"
      @click="handleClick"
    >
      <template #icon>
        <i class="ik ik-daoru"></i>
      </template>
      <template v-if="!circle">
        {{ t("action.import") }}
      </template>
    </el-button>
    <IkSvgIcon
      v-if="btnType === 'icon'"
      v-role="$props.role"
      name="ik-daoru"
      show-bg
      :width="40"
      size="small"
      v-bind="$attrs"
      @click="handleClick"
    />
  </IkTooltip>
</template>

<style lang="scss" scoped>
:deep(.iksvg) {
  text-align: center;
}
</style>
